﻿using System;
using System.Collections.Generic;
using System.Text;

namespace InternetSpiderLib.Scenes.UrlQueues
{
    public interface IUrlQueue
    {
        /// <summary>
        /// 添加一个Url到计划中
        /// </summary>
        /// <param name="url"></param>
        /// <param name="dateTime"></param>
        void AddUrl(string url, DateTime dateTime);

        /// <summary>
        /// 获取Url信息
        /// </summary>
        /// <param name="url"></param>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        bool GetUrl(string url, out DateTime dateTime);

        /// <summary>
        /// 移除Url
        /// </summary>
        /// <param name="url"></param>
        void RemoveUrl(string url);

        /// <summary>
        /// 获取队列内容
        /// </summary>
        /// <returns></returns>
        List<KeyValuePair<string, DateTime>> GetQueueItem();
    }
}
